package group.rober.common.entity;


import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.*;

@Table(name = "COMO_FILE")
public class FileEntity implements Serializable, Cloneable {
    @Id
    private String id;
    private String name;
    private String intro;
    private String mimeType;
    private String contentTye;
    private long size;
    private String fileType;
    private String barCode;
    private String qrCode;
    private String keyWords;
    private String storedContent;
    @Transient
    private Map<String,Object> properties = new LinkedHashMap<String,Object>();
    private long revision;
    private String createdBy;
    private Date createdTime;
    private String updatedBy;
    private Date updatedTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getMimeType() {
        return mimeType;
    }

    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }

    public String getContentTye() {
        return contentTye;
    }

    public void setContentTye(String contentTye) {
        this.contentTye = contentTye;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public String getQrCode() {
        return qrCode;
    }

    public void setQrCode(String qrCode) {
        this.qrCode = qrCode;
    }

    public String getKeyWords() {
        return keyWords;
    }

    public void setKeyWords(String keyWords) {
        this.keyWords = keyWords;
    }

    public String getStoredContent() {
        return storedContent;
    }

    public void setStoredContent(String storedContent) {
        this.storedContent = storedContent;
    }

    public Object getProperty(String name){
        return properties.get(name);
    }

    public void setProperty(String name,Object value){
        properties.put(name,value);
    }

    public Set<String> listPropetiesNames(){
        return properties.keySet();
    }

    public void clearProperties(){
        this.properties.clear();
    }

    public long getRevision() {
        return revision;
    }

    public void setRevision(long revision) {
        this.revision = revision;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public String getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }
}
